package health.lm.com.mine.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import health.lm.com.component_base.helper.ImageLoaderHelper;
import health.lm.com.mine.R;
import health.lm.com.mine.entity.ThinkTankItemEntity;

/**
 * 智库
 * @author Administrator
 */

public class ThinkTankItemAdapter extends BaseQuickAdapter<ThinkTankItemEntity.News_list,BaseViewHolder> {
    public ThinkTankItemAdapter(@Nullable List<ThinkTankItemEntity.News_list> data) {
        super(R.layout.item_think_tank, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ThinkTankItemEntity.News_list item) {
        helper.setText(R.id.tv_content_title,item.getTitle())
                .setText(R.id.tv_content_reading,String.format("%s次阅读",item.getView_num()))
                .setText(R.id.tv_content_type,"智库");
        ImageLoaderHelper.getInstance().load(mContext,item.getThumb(),helper.getView(R.id.iv_content_pic));
    }
}
